package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity2 extends AppCompatActivity {
    TextView ta,tb,tac,tbc;
    Button ba1,ba2,ba3,bb1,bb2,bb3,rs;
    private static final String TAG = "MainActivity";
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.teamscore);
        ta = findViewById(R.id.ta);
        tb = findViewById(R.id.tb);
        tac = findViewById(R.id.tac);
        tbc = findViewById(R.id.tbc);
        ba1=(Button)findViewById(R.id.ba1);

        ba2=(Button)findViewById(R.id.ba2);

        ba3=(Button)findViewById(R.id.ba3);

        bb1=(Button)findViewById(R.id.bb1);

        bb2=(Button)findViewById(R.id.bb2);

        bb3=(Button)findViewById(R.id.bb3);

        rs=(Button)findViewById(R.id.rs);


    }
    int suma=0;
    int sumb=0;
    public void Clickba1(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        suma=suma+1;
        tac.setText(""+suma);
    }
    public void Clickba2(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        suma=suma+2;
        tac.setText(""+suma);
    }
    public void Clickba3(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        suma=suma+3;
        tac.setText(""+suma);
    }
    public void Clickbb1(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        sumb=sumb+1;
        tbc.setText(""+sumb);
    }
    public void Clickbb2(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        sumb=sumb+2;
        tbc.setText(""+sumb);
    }
    public void Clickbb3(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        sumb=sumb+3;
        tbc.setText(""+sumb);
    }
    public void Clickrs(View v){
        Log.i(TAG,"myClick:11111");
        Log.i(TAG,"myClick");
        suma=0;
        sumb=0;
        tac.setText(""+suma);
        tbc.setText(""+sumb);
    }













}